package VerticalPrototypes;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author Tyler
 */

public class ConnectToDatabase {
    
    private static ConnectToDatabase instance = null;
    private Connection connection;
    
    public ConnectToDatabase()
    {
        try {
            // Initialize the connection
            connection = DriverManager.getConnection("snyamathi.dyndns.org:37965", "root", "baconatmidnight");
        } catch (SQLException ex) {
            Logger.getLogger(ConnectToDatabase.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public static ConnectToDatabase getConnectionToDatabase()
    {
        if(instance == null)
            instance = new ConnectToDatabase();
        return instance;
    }
}